#include<bits/stdc++.h>
#define ONLINE_JUDGE
#define ll long long
#define ull unsigned long long
using namespace std;

const int N = 1e6 + 10, INF = 0x3f3f3f3f;

int n;
vector<pair<int, int>> s;

bool check()
{
    for (int i = 0;i < n - 1;i++) {
        if (s[i].first != s[i + 1].first) return 0;
        if (s[i].second != s[i + 1].second) return 0;
    }
    return 1;
}

pair<int, int> get_r(pair<int, int> a, pair<int, int> b) { return{ b.first - a.first,b.second - b.second }; }

void solve()
{
    s.clear();
    cin >> n;
    for (int i = 0;i <= n;i++) {
        int x, y;cin >> x >> y;
        s.push_back({ x,y });
    }

    if (check()) { cout << -1; return; }

    long double ans = INF;
    for (int i = 0;i < n;i++)
        for (int j = i + 1;j < n;j++)
            for (int k = j + 1;k < n;k++) {
                pair<int, int> a = s[i], b = s[j], c = s[k];
                pair<int, int>r1 = get_r(a, b), r2 = get_r(a, c);
                long double s = (r1.first * r2.second - r1.second * r2.first) / 2.0l;
                if (s <= 0.0l) continue;
                ans = min(ans, s);
            }
    
    cout << ans << '\n';
}

signed main()
{
    // ios::sync_with_stdio(0);
    // cin.tie(0);cout.tie(0);
    cout << fixed << setprecision(10);
#ifndef ONLINE_JUDGE
    std::istringstream in(R"()");
    std::cin.rdbuf(in.rdbuf());
#endif
    int T = 1;
    cin >> T;

    for (int i = 1;i <= T;i++) {
        solve();
    }
}